package cc.comac.mom.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipRegularCheckPlanService;
import cc.comac.mom.bean.EquipRegularCheckPlan;
import cc.comac.mom.bean.EquipRegularCheckPlanBean;
import cc.comac.mom.bean.ResultDev;
import cc.comac.mom.datahandlers.entity.EquipRegularCheckPlanDataHandler;
import cc.comac.mom.util.ResultBean;

@RestController
@Service
public class EquipRegularCheckPlanServiceImpl implements EquipRegularCheckPlanService{

	@Autowired
	private EquipRegularCheckPlanDataHandler equipRegularCheckPlanDataHandler;
	@Override
	public ResultBean insert(@RequestBody EquipRegularCheckPlan obj) {
		// TODO Auto-generated method stub
		return equipRegularCheckPlanDataHandler.insert(obj);
	}

	@Override
	public ResultBean update(@RequestBody EquipRegularCheckPlan obj) {
		// TODO Auto-generated method stub
		return equipRegularCheckPlanDataHandler.update(obj);
	}

	@Override
	public ResultBean deleteBatch(@RequestBody List<EquipRegularCheckPlan> list) {
		// TODO Auto-generated method stub
		return equipRegularCheckPlanDataHandler.deleteBatch(list);
	}

	@Override
	public ResultBean disableEquipReqularCheckByIds(@RequestBody List<Long> list) {
		// TODO Auto-generated method stub
		return equipRegularCheckPlanDataHandler.disableEquipReqularCheckByIds(list);
	}

	@Override
	public ResultBean selectByFields(@RequestBody  EquipRegularCheckPlanBean obj) {
		ResultBean resultBean = new ResultBean(true);
		ResultDev selectByFields = equipRegularCheckPlanDataHandler.selectByFields(obj);
		resultBean.setObject(selectByFields);
		return resultBean;
	}

	@Override
	public ResultBean planIssue(@RequestBody List<Long> list) {
		// TODO Auto-generated method stub
		return equipRegularCheckPlanDataHandler.planIssue(list);
	}

	@Override
	public ResultBean insertBatch(@RequestBody List<EquipRegularCheckPlan> list) {
		// TODO Auto-generated method stub
		return equipRegularCheckPlanDataHandler.insertBatch(list);
	}

}
